﻿using System.Collections.Generic;
using Common.Modules;
using Entity;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace CommonTest
{
    [TestClass]
    public class UnitTest1
    {
        [TestMethod]
        public void TestMethod1()
        {
            PdfMaker pm = new PdfMaker();
            var examroomInfos = new List<ExamRoomInfo>();
            examroomInfos.Add(new ExamRoomInfo() { ExamName = "math", ExamAreaName = "hd", Comment = "every one is good" });
            examroomInfos.Add(new ExamRoomInfo() { ExamName = "laungae", ExamAreaName = "cp", Comment = "very bad" });
            pm.Initialize();
            pm.AddStudentCover("李金凤", "海淀培训");
            pm.AddHeader("考试评估报告");
            pm.AddChapter("综合分析");
            pm.AddPdfTable<ExamRoomInfo>(examroomInfos, "考试信息表", new float[] { 6f, 6f, 6f },
                m => m.ExamName, m => m.ExamAreaName, m => m.Comment);
            pm.AddSimpleParagraph("旅途充满了乌龙事件——Cappi丢行李，我也丢行李；还有错过末班车、转车乘错方向、找错航站楼……在欢乐又痛苦的小插曲中，圆满地完成了此次旅行。当然，回来之后也没省心，6000多张照片，导出的时候还曾发生copy问题，导致1000多张照片损坏，花了一个下午+一个晚上终于在一家数码修复的公司重新找回了这些珍贵的图片。磨磨蹭蹭地整理到今天，终于开帖了。");
            pm.SavePdf();
        }
    }
}
